|
|
|
|
|
|
|
This appendix contains a step-by-step explanation of the creation of the SQL-VB5 Interpreter project. This program is already on the CD-ROM included with your copy of the book. The SQL-VB5 program in this lesson allows you to use an ASCII editor to create SQL scripts that SQL-VB5 can read and process. SQL-VB5 can handle fully commented, multiline SQL scripts. You'll find that SQL-VB5 is a very handy data management tool. |
|
|
|
|
| |
|
|
|
|
You do not need to construct this project from scratch. It is already on the CD-ROM. However, you may want to go through this chapter as an added tutorial in constructing SQL-enabled applications in Visual Basic. |
|
|
|
|
|
|
|
|
|
|
You may often need to quickly generate sample database layouts for a programming project. You may even need to build some test data to run through data editing or reporting routines. The SQL-VB5 program enables you to do all that. The SQL-VB5 program is able to read SQL scripts you create with the Windows Notepad application (or any other ASCII editor). Listing A.1 is a sample SQL script that can be processed by SQL-VB5. |
|
|
|
|
|
|
|
|
Listing A.1. A sample SQL script. |
|
|
|
|
|
|
|
|
//
// load and read data tables
//
// open a database
dbOpen C:\TYSDBVB5\SQLVB5\SCRIPTS\BOOKS5.MDB
// open some tables to view
SELECT * FROM Authors;
SELECT * FROM Titles;
SELECT * FROM Publishers;
SELECT * FROM BookSales;
SELECT * FROM Buyers;
SELECT * FROM [Publisher Comments];
//
// eof
// |
|
|
|
|
|